import { processMappingApi } from '@/api/publicTools/processMapping/index'
import { color } from 'echarts'
import { symbol } from 'vue-types'

const image1: string =
  'https://winemanu.oss-cn-beijing.aliyuncs.com/c4b0035b58669f4bf416841d5fd438144bfe58fcd49d1887ed3cdf6e337f0540.png'
const image2: string =
  'https://winemanu.oss-cn-beijing.aliyuncs.com/2ac9f970411b421b14890b2a3a3c2787b6684d86bf615dce2832d5555847c945.png'

export const processMappingOption = {
  grid: {
    x: 0,
    y: 0,
    x2: 0,
    y2: 0
  },
  xAxis: {
    show: false,
    min: 0,
    max: 1000,
    axisPointer: {
      show: false
    }
  },
  yAxis: {
    show: false,
    min: 0,
    max: 1000,
    axisPointer: {
      show: false
    }
  },
  series: [
    {
      type: 'scatter',
      name: 'Mapping point',
      symbolSize: 30,
      color: ['#0000FF', '#FF0000', '#00FF00'],
      data: [
        { id: 1, symbol: 'circle', value: [50, 50] },
        { id: 1, symbol: 'circle', value: [50, 100] },
        { id: 2, symbol: 'triangle', value: [200, 100] },
        {
          symbol: 'triangle',
          value: [300, 100]
        },
        {
          symbol: 'triangle',
          value: [950, 100]
        },
        {
          symbol: 'triangle',
          value: [950, 950]
        }
      ],
      colorBy: 'data'
    }
  ]
}

export const getProcessMappingOption = async (id: number) => {
  const processMappingData = await processMappingApi.getProcessMappingByMasterId(id)
  console.log(processMappingData)
}
